@import './element-ui.scss';
//侧边栏

$sidebar-width-max: 256px;
$sidebar-width-min: 80px;
$sidebar-bg: #191a23;
$subMenuBg: #101117;
$menuHover: #1f2d3d;

.layout {
    display: flex;
    display: flex;
    flex-direction: column;
    flex: auto;
    background: #f5f7f9;
    overflow: hidden;

    //隐藏侧边栏
    &.hidderSidebar {
        .sidebar_wrap {
            width: $sidebar-width-min;
            min-width: $sidebar-width-min;
            max-width: $sidebar-width-min;
            flex: 0 0 $sidebar-width-min;

            .logo_wrap {
                width: $sidebar-width-min;
                height: 63px;
                line-height: 63px;
                text-align: center;
                overflow: hidden;
                transition: all .2s ease-in-out;

                img {
                    height: 80%;
                    vertical-align: middle;
                }
            }
        }

        .content_wrap {
            padding-left: 80px;

            .content_header {
                left: 80px;
            }

            .tabs_main_wrap {
                width: calc(100% - 80px);
            }
        }
    }

    // 侧边栏
    .sidebar_wrap {
        &::-webkit-scrollbar {
            display: none;
        }

        flex: 0 0 $sidebar-width-max;
        width: $sidebar-width-max;
        min-width: $sidebar-width-max;
        max-width: $sidebar-width-max;
        min-height: 100vh;
        background: $sidebar-bg;
        box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
        position: fixed;
        top: 0;
        left: 0;
        overflow: hidden;
        color: hsla(0, 0%, 100%, .7);
        overflow-y: auto;
        transition: all .2s ease-in-out;
        z-index: 100;

        // LOGO
        .logo_wrap {
            width: 256px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-bottom: 1px solid #101117;
            background: #191a23;
            height: 63px;
            text-align: center;
            overflow: hidden;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 15;
            transition: all .2s ease-in-out;

            img {
                height: 80%;
                vertical-align: middle;
            }
        }

        // 菜单
        .menu_wrap {
            position: static;
            margin-top: 64px;
            height: calc(100vh - 64px);
            background: $sidebar-bg;


            .el-menu {
                width: 100% !important;
                min-height: 100%;
                border-right: none;
                box-sizing: border-box;

                .el-menu-item {
                    &:hover {
                        background-color: $menuHover !important;
                    }
                }
            }

            .el-submenu .el-menu-item {
                background-color: $subMenuBg !important;

                &:hover {
                    background-color: $menuHover !important;
                }
            }

            .el-submenu__title {
                &:hover {
                    background-color: $menuHover !important;
                }
            }
        }

    }

    // 内容展示区
    .content_wrap {
        display: flex;
        flex-direction: column;
        flex: auto;
        background: #f5f7f9;
        min-height: 100vh;
        transition: all .2s ease-in-out;
        padding-left: 256px;

        // 内容头部导航
        .content_header {
            position: fixed;
            top: 0;
            right: 0;
            left: 256px;
            z-index: 11;
            background: #fff;
            padding: 0;
            box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
            transition: all .2s ease-in-out;
            display: flex;
            justify-content: space-between;
            height: 64px;

            .header_trigger {
                display: flex;
                justify-content: center;
                align-items: center;
                text-align: center;
                cursor: pointer;
                transition: all .2s ease-in-out;
                padding: 0 12px;
                font-size: 18px;
            }

            .header_left {
                display: flex;

                .collapse_wrap {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    height: 64px;
                }

                .header_breadcrumb {
                    display: flex;
                    align-items: center;
                    height: 64px;
                }
            }

            .header_right {
                display: flex;
                justify-content: center;
                align-items: center;
            }
        }

        .content_body {
            .content_main {
                height: calc(100vh - 110px);
                margin-top: 110px;
                overflow-y: auto;
            }
        }
    }
}


.container {

    .body_wrap {
        padding: 10px;

        // 表格功能按钮+搜索
        .table_tool_bar_wrap{
            .el-card__body {
                padding: 10px;
            }
            .base_wrap{
                display: flex;
                justify-content: space-between;

                .left{
                    display: flex;
                    align-items: center;
                    .el-form-item{
                        margin-bottom: 0;
                    }
                }
                .right{
                }
            }
        }

        // 高级搜索
        .where_wrap{
            margin-top: 10px;
            .el-card__body {
                padding: 0px;
                padding-top: 10px;
            }
            .el-form-item {
                padding: 0;
                margin: 0;
                margin-bottom: 10px;
            }
        }

        // 表格工具
        .table_min_tools{
            display: flex;
            justify-content: flex-end;
        }

        .pagination {
            margin-top: 20px;
            display: flex;
            justify-content: center;
        }

        .foot_submit{
            display: flex;
            justify-content: center;
            align-items: center;
        }
    }

    // /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
    // ::-webkit-scrollbar {
    //     width: 17px;
    //     height: 17px;
    //     background-color: #F5F5F5;
    //     border-radius: 10px;
    // }

    // /*定义滚动条轨道 内阴影+圆角*/
    // ::-webkit-scrollbar-track {
    //     box-shadow: inset 0 0 2px 0px rgba(0, 0, 0, 0.3);
    //     border-radius: 0px;
    //     background: #fff;
    // }

    // /*定义滑块 内阴影+圆角*/
    // ::-webkit-scrollbar-thumb {
    //     border-radius: 0px;
    //     background-color: rgba(144, 147, 153, 0.3);
    //     -webkit-transition: 0.3s background-color;
    //     transition: 0.3s background-color;
    // }
}

/*侧边抽屉数据详情*/
.drawer_wrap{
    position: relative;

    .header_title{
        position: fixed;
        height: 60px;
        width: 800px;
        display: flex;
        align-items: center;
        padding: 0 20px;
        border-bottom: 1px solid #ddd;
        background: #fff;
        font-weight: 600;
        z-index: 10;
        display: flex;
        justify-content: space-between;
        font-size: 18px;
        .title{
            font-size: 18px;
        }
        .close{
            font-size: 28px;
        }
    }
    .header_body{
        margin-top: 60px;
        padding: 20px;
    }
}

/*显示或隐藏表格列*/
.isHideCol_wrap{
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    align-items: center;
    height: 40px;
    margin-bottom: 10px;
    .title{
        font-weight: 600;
    }
}
.check_wrap{
    max-width: 600px;
    overflow: hidden;
}

/*子页面返回栏*/
.headerBack {
    padding: 10px 0px 0px 0px;
    background: #fff;
}

/* 路由动画 */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all .5s;
}

.fade-transform-enter {
  opacity: 0;
  transform: translateX(-30px);
}

.fade-transform-leave-to {
  opacity: 0;
  transform: translateX(30px);
}
